Algorithm Writer 25 11 18 Machine learning - philosophy, specification, steps, data, bug correction Algorithm writer - program finder, list decomposition and list building in addition to replace in program finder, possible different models Mind reader - Tesseract Algorithm writer with texttobreasonings2 When modifying texttobreasonings2 to allow inputting number of times to repeat algorithm, It is better to change the existing code myself (because it is operating on the main predicate) than respecify and algorithm write the algorithm If it were a non-main predicate, then the predicate to be changed would be indicated by line number, and respecified/hand changed, and if respecified then the predicate's non-changing subpredicates would need to be indicated by line number A repository algorithm will record each complete change to suggest in similar cases later. A text editor will allow the algorithm to recommend the changes. The predictive word processor would write algorithms by specifications, etc. Rewrites code when the user presses a key - if the user edits the code, then it is checked by the specification - version history to back up - reminds to rewrite code for changed specifications on close SWI-Prolog refreshes the whole window - use tty_size(R,C). It won't need algorithm writer, just predictive text and algorithms that change past code - ways to change the code, e.g. subpredicates changed/unchanged, asks whether to change specification, predicate/variable names - asks if wants to rewrite code when the specification has been changed by itself, then saves changes to predictive data then and when the code is hand changed when the user follows the specification change code - term structure modifier - if the user adds new parts to the specification - type conversion - not part of changing code because it is part of the interpreter level - warns if can't include subpredicate - Test finding algorithm using small ideas - Swaps, etc. arguments into place by structure, etc. - In fact, never changes code (tries predicates with fewer arguments) ? - Uses an algorithm to select combinations of code to place in certain predicates x tries combinations x ? - confirm deletion - confirms if want to create a new subpredicate code database does not contain dependent predicates, just calls - that is why term structure needs to modified on the fly, because the user can change the terms later X the term and arity structures can be intact; the algorithm can reuse parent predicates and the subpredicates - Uses symbols to represent where the user uses constants, e.g. "" or [] - the correct code relies on specification - may replicate reused code with different modifications for clauses x requires a manual rewrite and later reuse - the term, arity structure added, to simplified - like part of program finder, detects puts in/removes parts (not) in the specification - eventually, the system can scan through predictions to satisfy the specification, automating algorithm writing Writing philosophy/algorithms Creativity - conversations about sex with the philosopher - funnels idea from nature - into algorithm specs Chat Bot - " Uses the latest version of a (changed to) specification's code - Only converts from the specification (list of inputs and outputs, and required subpredicates for predicate) to code, not predicts rest of specification (too many) or code (just converts) - The "predictive data" is the code to be reused in fact - Finds patterns in number, type, structure of terms and their mathematical patterns - Tries writing clauses with the base case, if necessary, to satisfy the specification You hardly ever change back to an old version, so change to later version x algorithms have own requirements - don't store code modified by changer, change other code to it Should call a subpredicate that has previously worked xxx - a predicate may be used, e.g. three times - recursion tested to level = 1000 Try to avoid coding infinite loops Predictions for specifications Time the cognitive product and predicate running times to suggest instructions for recursion and normal running time respectively - later Suggest to articulate to (one in a use hierarchy of) a newer specification on the same line X unless otherwise suggested by cog product and predicate running times x later and perhaps variable type, e.g. music note x Where that variable could refer to music is stored in the database, taken from spec x unnecessarily complicates it Ask to add, e.g. music label etc., can switch off asking x Write code reuser, then do word processor, p sp st d mind reader and Tesseract later